<!DOCTYPE html>
<!--
Copyright 2019 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel="import" href="/elements/queue-stats-page.html">
<link rel="import" href="/static/testing_common.html">
<link rel="import" href="/tracing/base/unit.html">
<link rel="import" href="/tracing/core/test_utils.html">

<script>
'use strict';

tr.b.unittest.testSuite(function() {
  const testOptions = {
    tearDown() {
      testing_common.clearXhrMock();
    }
  };

  test('instantiation', function() {
    const mockResponse = {
      'queued_jobs': 1,
      'cancelled_jobs': 0,
      'running_jobs': 1,
      'queue_time_samples': [[0.5, 0], [1.2, 0], [0.75, 1], [2.1, 1], [3.1, 1]]
    };
    testing_common.addXhrMock('*', JSON.stringify(mockResponse));
    const page = document.createElement('queue-stats-page');
    this.addHTMLOutput(page);
  }, testOptions);
});
</script>
